#ifndef SERVICE_IMPL_H
#define SERVICE_IMPL_H

#include<iostream>
#include<vector>
#include"service.h"
#include<stdlib.h>
#include"servicedao_file_impl.h"
#include"servicedao.h"
#include <vector>

using namespace std;

class ServiceImpl:public Service
{
	ServiceDao* daoo;
	vector<Department> vecd;
public:
	ServiceImpl()
	{
		daoo = new ServiceDaoFileImpl;
		daoo->load(vecd);
	}
	 bool addDept(Department dept);
	 bool delDept(int deptid);
	 bool addEmp(int idd,Employee emp);
	 bool delEmp(int id,int empid);
	 bool modEmp(int depid,int idd,Employee emp);
	 void listDept();
	 void listEmp(int deptid);
	 void listAllEmp();
	~ServiceImpl()
	{
		daoo->save(vecd);
		delete daoo;
	}
};


#endif//SERVICE_IMPL_H
